package com.artPreter.pojo.other.statistics;

import com.artPreter.pojo.Floor;
import com.artPreter.pojo.Position;
import com.artPreter.pojo.Room;
import lombok.Data;

import java.util.List;

@Data
public class BuildTree {

    public String name;

    public String uuid;

    public Integer type;

    public Integer area;

    public List<BuildTree> child;

    public String planView;

    public Double locX;

    public Double locY;

    public Double locW;

    public Double locH;



    public BuildTree(Floor floor) {
        this.name = floor.getFloorName();
        this.uuid = floor.getUuid();
        this.type =2;
        this.area = floor.getArea();
        this.locH = floor.getLoc_h();
        this.locW = floor.getLoc_w();


    }

    public BuildTree(Room room) {
        this.name = room.getRoomName();
        this.uuid = room.getUuid();
        this.type =3 ;
        this.area = room.getArea();
        this.locX = room.getLocX();
        this.locY = room.getLocY();
        this.locW = room.getLocW();
        this.locH = room.getLocH();
    }

    public BuildTree(Position position) {
        this.name = position.getPosiName();
        this.uuid = position.getUuid();
        this.type =1 ;
        this.area = position.getArea();
    }
}
